﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo01
{
    class Program
    {/*## 练习

            1.定义一个用户类，存放用户的账号、用户名和密码属性；
            2.在用户类中定义一个方法输出当前用户对象的账号、用户名和密码的信息；然后在主方法调用输出；*/

        static void Main(string[] args)
        {
            Users s = new Users();
            s.UserName = "Curry";
            s.UserNo = 1;
            s.Password = "123456";
            s.Tell();
            Console.ReadKey();
        }

    }
    class Users
    {
        private int _userNo;
        private string _userName;
        private string _password;

        public Users() { }
        public int UserNo
        {
            get { return _userNo; }
            set { _userNo = value; }

        }
        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }
        public void Tell()
        {
            Console.WriteLine("当前用户的账号是{0}、用户名是{1}，密码是{2}", this._userNo, this._userName, this._password);
        }

    }
    }
